View Javadoc

1   /*
2   * Copyright 2005 Arnaud Prost
3   * 
4   * Arnaud.prost@gmail.com
5   * 
6   * This software is a computer program whose purpose is to ease the 
7   * management of software project.
8   * 
9   * This software is governed by the CeCILL  license under French law and
10  * abiding by the rules of distribution of free software.  You can  use, 
11  * modify and/ or redistribute the software under the terms of the CeCILL
12  * license as circulated by CEA, CNRS and INRIA at the following URL
13  * "http://www.cecill.info". 
14  * 
15  * As a counterpart to the access to the source code and  rights to copy,
16  * modify and redistribute granted by the license, users are provided only
17  * with a limited warranty  and the software's author,  the holder of the
18  * economic rights,  and the successive licensors  have only  limited
19  * liability. 
20  * 
21  * In this respect, the user's attention is drawn to the risks associated
22  * with loading,  using,  modifying and/or developing or reproducing the
23  * software by the user in light of its specific status of free software,
24  * that may mean  that it is complicated to manipulate,  and  that  also
25  * therefore means  that it is reserved for developers  and  experienced
26  * professionals having in-depth computer knowledge. Users are therefore
27  * encouraged to load and test the software's suitability as regards their
28  * requirements in conditions enabling the security of their systems and/or 
29  * data to be ensured and,  more generally, to use and operate it in the 
30  * same conditions as regards security. 
31  * 
32  * The fact that you are presently reading this means that you have had
33  * knowledge of the CeCILL license and that you accept its terms.
34  */
35  package net.sf.pmr.agilePlanning.domain.release;
36  
37  import java.util.Date;
38  
39  import net.sf.pmr.core.domain.basicProject.BasicProject;
40  import net.sf.pmr.keopsframework.domain.object.AbstractDomainObject;
41  
42  import org.apache.commons.lang.builder.EqualsBuilder;
43  import org.apache.commons.lang.builder.HashCodeBuilder;
44  
45  /***
46   * @author Arnaud Prost (arnaud.prost@gmail.com)
47   */
48  public class ReleaseImpl extends AbstractDomainObject implements Release {
49  
50      /***
51       * basic Project
52       */
53      private BasicProject basicProject;
54  
55      /***
56       * number
57       */
58      private String number;
59  
60      /***
61       * date
62       */
63      private Date date;
64  
65      /***
66       * @see net.sf.pmr.agilePlanning.domain.release.Release#getBasicProject()
67       */
68      public BasicProject getBasicProject() {
69          return basicProject;
70      }
71  
72      /***
73       * @see net.sf.pmr.agilePlanning.domain.release.Release#setBasicProject(net.sf.pmr.core.domain.basicProject.BasicProject)
74       */
75      public void setBasicProject(final BasicProject basicProject) {
76          this.basicProject = basicProject;
77      }
78  
79      /***
80       * @see net.sf.pmr.agilePlanning.domain.release.Release#getNumber()
81       */
82      public String getNumber() {
83          return number;
84      }
85  
86      /***
87       * @see net.sf.pmr.agilePlanning.domain.release.Release#setNumber(java.lang.String)
88       */
89      public void setNumber(final String number) {
90          this.number = number;
91  
92      }
93  
94      /***
95       * @see net.sf.pmr.agilePlanning.domain.release.Release#getDate()
96       */
97      public Date getDate() {
98          return date;
99      }
100 
101     /***
102      * @see net.sf.pmr.agilePlanning.domain.release.Release#setDate(java.util.Date)
103      */
104     public void setDate(final Date date) {
105         this.date = date;
106 
107     }
108 
109     /***
110      * @see java.lang.Object#equals(Object)
111      */
112     public boolean equals(final Object object) {
113         if (!(object instanceof ReleaseImpl)) {
114             return false;
115         }
116         ReleaseImpl rhs = (ReleaseImpl) object;
117         return new EqualsBuilder().append(this.basicProject, rhs.basicProject).append(this.number, rhs.number).isEquals();
118     }
119 
120     /***
121      * @see java.lang.Object#hashCode()
122      */
123     public int hashCode() {
124         return new HashCodeBuilder(-746013211, 836163745).append(this.basicProject).append(this.number).toHashCode();
125     }
126 }